:root {
    --control-text-color: #777;
    --primary-color: #7b8ddd;
    --select-text-bg-color: #ebe1f5;
    --search-select-bg-color: #8163bd;
    --title-color: #6c549c;
    --text-color: #333333;
    --light-text-color: #666666;
    --light-text-color-darker: #74818d;
    --link-color: #745fb5;
    --code-color: #ff79c6;
    --boxes-darker: #d8e0e7;
    --boxes-darker2: #bac2c9;
    --boxes-darkest: #9daab6;
    --heading-text-color: #242a31;
    --purple-light-1: rgba(116, 95, 181, 0.05);
    --purple-light-2: rgba(116, 95, 181, 0.1);
    --purple-light-3: rgba(116, 95, 181, 0.3);
    --purple-light-4: rgba(116, 95, 181, 0.7);
    --boxes: #f5f7f9;
    --border: #eee;
    --borders: #e6ecf1;
    --shadow: 0rem 0.2rem 0.4rem var(--purple-light-2);
    /* side bar */
    --side-bar-bg-color: #f7f7fb;
    --active-file-text-color: var(--title-color);
    --active-file-bg-color: var(--purple-light-2);
    --item-hover-bg-color: var(--purple-light-2);
    --active-file-border-color: var(--purple-light-4);
    --base-font: "Noto Serif", "Noto Serif CJK SC", -apple-system, Ubuntu, "Microsoft YaHei", Helvetica, "Nimbus Sans L", Arial, "Liberation Sans", "Noto Sans CJK SC", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Source Han Sans CN", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", "ST Heiti", SimHei, "WenQuanYi Zen Hei Sharp", "Source Sans Pro", sans-serif;
    --title-font: "Noto Serif", "Noto Serif CJK SC", "EB Garamond", Sitka Small Semibold, "Nimbus Roman No9 L", "Songti SC", "Source Han Serif SC", "Source Han Serif CN", STSong, "AR PL New Sung", "AR PL SungtiL GB", NSimSun, SimSun, "TW\-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", PMingLiU, MingLiU, "Ubuntu", "Source Sans Pro", serif;
    --monospace: "Consolas", "JetBrains Mono", "Fira Code", "Cascadia Code", "Sarasa Term SC", Monaco, "Deja Vu Sans Mono", Consolas, "Lucida Console", "Andale Mono", "Roboto Mono", Courier, Monospace !important;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-rendering: optimizelegibility;
    -webkit-font-smoothing: initial;
}

body {
    color: var(--base-color);
    background-color: #fdf1f1;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6rem;
    letter-spacing: 0;
    overflow-x: hidden;
    font-family: var(--title-font);
}


/* 页边距 和 页面大小 */

#write {
    font-family: "Sitka Small Semibold", "华文中宋";
    max-width: initial;
    margin: 0 auto;
    padding: 1rem, 6rem;
    padding-bottom: 100px;
}

#write p {
    line-height: 1.6rem;
    word-spacing: 0.05rem;
}

body>*:first-child {
    margin-top: 0 !important;
}

body>*:last-child {
    margin-bottom: 0 !important;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

#write a:hover {
    border-bottom: 1px solid var(--link-color);
    color: var(--link-color);
    text-decoration: none;
}

.md-content {
    color: var(--purple-light-4);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: normal;
    line-height: 1.4;
    cursor: text;
    color: var(--title-color);
    font-family: "Times New Roman", "华文中宋";
}

h1 tt,
h1 code {
    font-size: inherit !important;
}

h2 tt,
h2 code {
    font-size: inherit !important;
}

h3 tt,
h3 code {
    font-size: inherit !important;
}

h4 tt,
h4 code {
    font-size: inherit !important;
}

h5 tt,
h5 code {
    font-size: inherit !important;
}

h6 tt,
h6 code {
    font-size: inherit !important;
}

h1 {
    padding-bottom: 0.4rem;
    font-size: 2.2rem;
    line-height: 1.3;
}

h1 {
    text-align: center;
    font-size: 2em;
    line-height: 1.2;
}

h1:after {
    content: "";
    display: block;
    margin: 0.2em auto 0;
    width: 6rem;
    height: 2px;
    font-weight: bold;
    border-bottom: 2px solid var(--title-color);
}

h2 {
    padding-left: 0.4em;
    line-height: 1.4;
    font-size: 1.7em;
    font-weight: 500;
    border-left: 9px solid var(--title-color);
    border-bottom: 1px solid var(--title-color);
}

h3 {
    font-size: 1.5em;
    font-weight: 500;
    line-height: 1.43;
}

h4 {
    font-size: 1.3em;
}

h5 {
    font-size: 1.1em;
}

h6 {
    font-size: 1em;
}

p,
blockquote,
ul,
ol,
dl,
table {
    margin: 0.8em 0;
}


/* horizontal rule */

hr {
    margin: 1em auto;
    border: 0;
    border-top: 1px solid var(--border);
}


/* 列表 */

li>ol,
li>ul {
    margin: 0 0;
}

li p.first {
    display: inline-block;
}

ul,
ol {
    padding-left: 2rem;
}

ul:first-child,
ol:first-child {
    margin-top: 0;
}

ul:last-child,
ol:last-child {
    margin-bottom: 0;
}

#write ol li,
ul li {
    padding-left: 0.1rem;
}


/* 引用 */

blockquote {
    width: 100%;
    border-left: 5px solid var(--primary-color);
    border-radius: 0.3rem;
    padding: 1rem;
    background-color: #edeaf1;
    font-family: "Sitka Small Semibold", "华文中宋";
}


/* 表格 */

table {
    margin-bottom: 1.25rem;
}

table th,
table td {
    padding: 8px;
    line-height: 1.25rem;
    vertical-align: middle;
    border: 1px solid rgb(201, 183, 236);
}


/*the first row of the table*/

table tr th {
    font-weight: bold;
    font-size: 30px;
    border-bottom: 30;
    border-top: 30;
    margin: 0;
    padding: 35px 13px;
}

table th {
    font-weight: normal;
    font-size: 40px;
}

table thead th {
    vertical-align: middle;
}


/* 表格 背景色 */

table tr:nth-child(2n),
thead {
    background-color: #f8eded;
}


/* 粗体 */

#write strong {
    padding: 0.2px;
    color: var(--primary-color);
    font-weight: bolder;
}


/* 斜体 */

#write em {
    padding: 0 5px 0 2px;
}


/* inline code */

#write code,
tt {
    padding: 2px 4px;
    border-radius: 0.3rem;
    font-family: var(--monospace);
    font-size: 0.92rem;
    color: #35768a;
    background-color: #dee6e5;
}

tt {
    margin: 0 2px;
}

#write .md-footnote {
    background-color: var(--purple-light-1);
    color: var(--code-color);
}


/* highlight. */

#write mark {
    background-color: var(--select-text-bg-color);
    border-radius: 0.3rem;
    padding: 2px 4px;
    margin: 0 2px;
    color: var(--text-color);
}

#write del {
    padding: 1px 2px;
}

.md-task-list-item>input {
    margin-left: -1.3em;
}

@media print {
    #write strong::before {
        padding: 0.2px;
        font-weight: bolder;
    }
    @page {
        size: A3;
    }
}

#write pre.md-meta-block {
    padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block>.code-tooltip {
    bottom: 0.375rem;
}


/* 图片 */

.md-image>.md-meta {
    border-radius: 3px;
    font-family: var(--monospace);
    padding: 2px 0 0 4px;
    font-size: 0.9em;
    color: inherit;
}


/* 图片靠左显示 */


/* p .md-image:only-child {
  width: auto;
  text-align: left;
  margin-left: 2rem;
} */


/* 写![shadow-...]() 显示图片阴影 */

img[alt|="shadow"] {
    box-shadow: var(--shadow);
}

#write a.md-toc-inner {
    line-height: 1.6;
    white-space: pre-line;
    border-bottom: none;
    font-size: 0.9rem;
}

header,
.context-menu,
.megamenu-content,
footer {
    font-family: var(--base-font);
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state {
    visibility: visible;
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #e6f0fe;
}


/* 代码框 */


/* CodeMirror 3024 Day theme */


/* 代码段 背景 */

pre {
    --select-text-bg-color: #ebe1f5;
}


/* border and bg */

.md-fences {
    border: 1px solid var(--border);
    border-radius: 5px;
    background: #fdfdfd !important;
}

#write pre.md-fences {
    display: block;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow);
}

.cm-s-inner {
    padding: 0.25rem;
    border-radius: 0.25rem;
}


/****** Code highlight ******/

.cm-s-inner.CodeMirror {
    padding: 0.15rem 0.05rem 0.15rem 0.25rem;
    color: #256d03 !important;
    border: none;
    border-radius: 6px;
    border-left: 5px solid #abb6d3;
    background-color: #edeaf1;
}

.cm-s-inner .CodeMirror-gutters {
    padding: 0.15rem 0.15rem 0.15rem 0.15rem;
    color: #256d03 !important;
    border: none;
    border-right: 2px solid #c1d3d8;
    background-color: #edeaf1;
}

.cm-s-inner .CodeMirror-lines {
    padding-left: 7px;
}

.cm-s-inner .CodeMirror-cursor {
    border-left: 11px solid #f8f8f0;
}

.cm-s-inner div.CodeMirror-selected {
    background: rgba(255, 255, 255, 0.15);
}

.cm-s-inner.CodeMirror-focused div.CodeMirror-selected {
    background: rgba(255, 255, 255, 0.10);
}

.cm-s-inner .CodeMirror-line::selection,
.cm-s-inner .CodeMirror-line>span::selection,
.cm-s-inner .CodeMirror-line>span>span::selection {
    background: rgba(255, 255, 255, 0.10);
}

.cm-s-inner .CodeMirror-line::-moz-selection,
.cm-s-inner .CodeMirror-line>span::-moz-selection,
.cm-s-inner .CodeMirror-line>span>span::-moz-selection {
    background: rgba(255, 255, 255, 0.10);
}

.cm-s-inner .CodeMirror-activeline-background {
    background: rgba(0, 0, 0, 0);
}

.cm-s-inner .cm-keyword {
    color: rgb(65, 12, 100);
}

.cm-s-inner .cm-operator {
    color: rgb(25, 70, 3);
}

.cm-s-inner .cm-variable-2 {
    color: #085c53;
}

.cm-s-inner .cm-variable-3 {
    color: #073072;
}

.cm-s-inner .cm-builtin {
    color: #7a6707;
}

.cm-s-inner .cm-atom {
    color: #4b0903;
}

.cm-s-inner .cm-number {
    color: #610b03;
}

.cm-s-inner .cm-def {
    color: rgb(5, 91, 94);
}

.cm-s-inner .cm-string {
    color: #497704;
}

.cm-s-inner .cm-string-2 {
    color: #06756a;
}

.cm-s-inner .cm-comment {
    color: #075679;
}

.cm-s-inner .cm-variable {
    color: #05265c;
}

.cm-s-inner .cm-tag {
    color: #05685e;
}

.cm-s-inner .cm-meta {
    color: #184642;
}

.cm-s-inner .cm-attribute {
    color: #754f08;
}

.cm-s-inner .cm-property {
    color: #076b45;
}

.cm-s-inner .cm-qualifier {
    color: #6e5e0b;
}

.cm-s-inner .cm-variable-3 {
    color: #5f5005;
}

.cm-s-inner .cm-tag {
    color: rgb(117, 10, 28);
}

.cm-s-inner .cm-error {
    color: rgb(110, 8, 8);
    background-color: #EC5F67;
}

.cm-s-inner .CodeMirror-matchingbracket {
    text-decoration: underline;
    color: rgb(117, 47, 47) !important;
}

.cm-s-inner .cm-header,
.cm-s-inner.cm-header {
    color: #334EEA;
}

.md-fences.md-focus .cm-s-inner .CodeMirror-activeline-background {
    background: var(--purple-light-1);
}

.cm-s-inner .CodeMirror-matchingbracket {
    text-decoration: underline;
    color: #a34e8f !important;
}

#fences-auto-suggest .active {
    background: #ddd;
}


/* language tip */

#write .code-tooltip {
    border: 1px solid var(--border);
}

.auto-suggest-container {
    border-color: #b4b4b4;
}

.auto-suggest-container .autoComplt-hint.active {
    background: #b4b4b4;
    color: inherit;
}


/* task list */

#write .md-task-list-item>input {
    -webkit-appearance: initial;
    display: block;
    position: absolute;
    border: 1px solid #b4b4b4;
    border-radius: 0.2rem;
    margin-top: 0.3rem;
    height: 1rem;
    width: 1rem;
    transition: background 0.3s;
}

#write .md-task-list-item>input:focus {
    outline: none;
    box-shadow: none;
}

#write .md-task-list-item>input:hover {
    background: #ddd;
}

#write .md-task-list-item>input[checked]::before {
    content: "";
    position: absolute;
    top: 20%;
    left: 50%;
    height: 60%;
    width: 2px;
    transform: rotate(40deg);
    background: #333;
}

#write .md-task-list-item>input[checked]::after {
    content: "";
    position: absolute;
    top: 46%;
    left: 25%;
    height: 30%;
    width: 2px;
    transform: rotate(-40deg);
    background: #333;
}

#write .md-task-list-item>p {
    transition: color 0.3s, opacity 0.3s;
}

#write .md-task-list-item.task-list-done>p {
    color: #b4b4b4;
    text-decoration: line-through;
}

#write .md-task-list-item.task-list-done>p>.md-emoji {
    opacity: 0.5;
}

#write .md-task-list-item.task-list-done>p>.md-link>a {
    opacity: 0.6;
}


/* sidebar and outline */

.pin-outline .outline-active {
    color: var(--active-file-text-color);
}

#typora-sidebar,
.typora-node #typora-sidebar {
    box-shadow: 3px 0px 10px var(--purple-light-2);
}

.file-list-item {
    border-bottom: 1px solid;
    border-color: var(--purple-light-2);
}

.file-list-item-summary {
    font-weight: normal;
}

.file-list-item.active {
    color: var(--active-file-text-color);
    background-color: var(--purple-light-2);
}

.file-tree-node.active>.file-node-background {
    background-color: var(--purple-light-2);
    font-weight: normal;
}

.file-tree-node.active>.file-node-content {
    color: var(--active-file-text-color);
    font-weight: normal;
}

.sidebar-tabs {
    border-bottom: none;
}

.sidebar-tab.active {
    font-weight: normal;
}

.info-panel-tab-border {
    color: var(--purple-light-4);
}

.sidebar-content-content {
    font-size: 0.82rem;
}


/* 搜索 */

.ty-file-search-match-text {
    background-color: var(--purple-light-3);
}

.md-search-hit {
    background-color: var(--purple-light-3);
    contain: style;
}

element.style {
    width: calc(100% - 18px);
}

.search-input,
.search,
.form-control,
#file-library-search-input {
    background-color: transparent !important;
    border-radius: 0.3rem !important;
    border: solid 1px var(--boxes-darker) !important;
    box-shadow: none !important;
    color: var(---heading-text-color) !important;
    font-size: 0.9rem !important;
    font-weight: 400;
    padding: 0.7rem !important;
    height: 1.6rem;
    transition-duration: 0.2s;
    transition-property: border, box-shadow;
}

.search-input:hover,
.search:hover,
.form-control:hover,
#file-library-search-input:hover {
    border: solid 1px var(--boxes-darker2) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important;
}

.search-input:focus,
.search:focus,
.form-control:focus,
#file-library-search-input:focus {
    background-color: transparent !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important;
    color: var(--heading-text-color) !important;
    font-size: 0.8rem !important;
    padding: 0.5rem !important;
}

.search-input::placeholder,
.search::placeholder,
.form-control::placeholder,
#file-library-search-input::placeholder {
    color: var(--light-text-color-darker) !important;
}

.code-tooltip .ty-input:focus,
input:focus {
    border-color: var(--purple-light-3);
}

.outline-item .outline-label {
    display: block;
    width: 100%;
    padding-top: 0.04rem;
    padding-bottom: 0.04rem;
    border-right: solid 2px transparent;
    font-family: "Century", "微软雅黑";
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--light-text-color-darker);
    transition-duration: 0.3s;
    transition-property: color;
}

.outline-active.outline-label {
    font-weight: 600;
    color: var(--title-color);
}

#close-outline-filter-btn {
    top: 15px;
    opacity: 1;
    color: var(--light-text-color) !important;
}

#close-outline-filter-btn:hover {
    color: var(--primary-color) !important;
    background-color: transparent !important;
}

#close-outline-filter-btn:active {
    background-color: transparent !important;
}


/*DROPDOWN*/

.dropdown-menu:not(.megamenu-menu-list),
.auto-suggest-container {
    background-color: var(--bg-color);
    border: solid 1px var(--borders) !important;
    box-shadow: rgba(116, 129, 141, 0.1) 0px 3px 8px 0px;
    user-select: none;
}

.dropdown-menu>li>a {
    font-family: "Century", "微软雅黑";
    font-weight: 500;
    font-size: 0.7rem;
    transition-duration: 0.2s;
    transition-property: all;
}

.dropdown-menu>.active>a,
.dropdown-menu>li>a:hover,
.menu-style-btn.active,
.context-menu.dropdown-menu>.active>a,
.context-menu.dropdown-menu>li>a:hover {
    color: var(--primary-color);
    background-color: var(--boxes);
}

.context-menu.dropdown-menu>li>a {
    padding: 1pt 24px 1pt 24px;
}

.menu-style-btn {
    color: var(--text-color);
    border: none;
    transition-duration: 0.2s;
    transition-property: all;
}

.menu-style-btn:hover {
    color: var(--primary-color);
    background-color: var(--boxes);
    border: none;
}

header .menu-style-btn:hover {
    background-color: transparent;
}

.menu-item-container {
    padding: 0 1px 0 1px;
}

.menu-item-container a.menu-style-btn {
    padding: 0.3rem 0.6rem;
    margin: 0;
}

.dropdown-menu .divider {
    border-color: var(--borders);
}

.info-panel-tab-title {
    font-family: "Century", "微软雅黑";
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1.2rem;
    padding-bottom: .4rem;
    -webkit-app-region: no-drag;
}

.ty-sidebar-search-panel {
    padding-left: 10px;
    padding-right: 10px;
    border-bottom: var(--window-border);
}